#include<bits/stdc++.h>
using namespace std;

int a[100000];

void fun(int n)
{
	double rate_pass = 0, rate_excellent = 0; 
	for(int i = 1;i <= n;i++)
	{
		if(a[i] >= 60)
			rate_pass++;
		if(a[i] >= 85)
			rate_excellent++;
	}
	cout<<round(rate_pass/n*100)<<"%"<<endl;
	cout<<round(rate_excellent/n*100)<<"%"<<endl;
}

int main()
{
	int n;
	cin>>n;
	for(int j = 1;j <= n;j++)
		cin>>a[j];
	
	fun(n);
	return 0;
}

